<?php 
	/**
	 * @author Matthias Eigner | 0625203
	 */
	class UserDescription {
        private $nick;
        private $id;
        private $fN;
        private $lN;
        private $email;
        private $projects;
        private $status;
        
        const STATUS_ONLINE = 1;
        const STATUS_BLOCKED = 0;
        
        public function __construct($nick, $id, $fN, $lN, $emails, $status=self::STATUS_ONLINE) {
            $this->nick = $nick;
            $this->lN = $lN;
            $this->id = $id;
            $this->fN = $fN;
            $this->email = $emails;
            $this->projects = array();
            $this->status = $status;
        }
        
        public function getNick(){ 
        	return $this->nick;
       	}
        
        public function getId(){ 
        	return $this->id;
        }
        
        public function getFirstName(){ 
        	return $this->fN;
        }
        
        public function getLastName() {
        	return $this->lN;
        }
        
		public function getName() {
        	return $this->fN.' '.$this->lN;
        }
        
       	public function getEMail(){
       		return $this->email;
       	}
       	
       	public function getProjects(){
       		if($this->projects == array()) {
       			$this->projects = $GLOBALS['Db-I']->getProjects($this->getId());
       		}
       		return $this->projects;
       	}
       	
       	public function getStatus() {
       		return $this->status;
       	}
    }
 ?>